<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8"/>
    <title>退单列表</title>
    <link href="https://cdn.bootcss.com/twitter-bootstrap/3.0.1/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>


<div class="container">
    <div class="row clearfix">
        <div class="col-md-12 column">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h3 class="panel-title">
                        筛选查询
                    </h3>
                </div>
                <div class="panel-body">
                    <form method="get" action="/order/findbacks">
                        <table>
                            <tr><td>
                                    退货单号：<input type="text" name="backnum" value="${backnum!''}" size="8" />
                                    退单来源：<input type="text" value="${source!''}" name="source" size="8" />
                                    客户名称：<input name="username" value="${username!''}" type="text" size="8"  />
                                    退单时间：<input type="date" value="${backdate!''}" name="backdate"  />
                                    退单状态：<select name="backstate" >
                                        <#--            //0未支付,1未发货,2已发货,3已完成,4已取消-->
                                        <#if (!backstate??)>
                                            <option value="0" >全部</option>
                                            <option value="1" >待审核</option>
                                            <option value="2" >待取货</option>
                                            <option value="3" >待退款</option>
                                            <option value="4" >已完成</option>
                                        </#if>
                                        <#if (backstate??)>
                                            <option value="0" <#if (backstate==0)>selected="selected"</#if>>全部</option>
                                            <option value="1" <#if (backstate==1)>selected="selected"</#if>>未审核</option>
                                            <option value="2" <#if (backstate==2)>selected="selected"</#if>>待取货</option>
                                            <option value="3" <#if (backstate==3)>selected="selected"</#if>>待退款</option>
                                            <option value="4" <#if (backstate==4)>selected="selected"</#if>>已完成</option>
                                        </#if>
                                    </select>
                                    <input type="submit" value="查找"/>
                                </td></tr>
                        </table>
                    </form>
                </div>
            </div>
            <#if (pageInfo.list?size!=0)>
            <table class="table table-striped" border="1">
                <thead>
                <tr>
                    <th>序号</th>
                    <th>退单号</th>
                    <th>商品名称</th>
                    <th>商品编号</th>
                    <th>单价</th>
                    <th>数量</th>
                    <th>客户编码</th>
                    <th>客户名称</th>
                    <th>联系方式</th>
                    <th>实付金额</th>
                    <th>退单时间</th>
                    <th>退单来源</th>
                    <th>订单状态</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                <#list pageInfo.list as back>
                    <tr class="success">
                        <td>${back_index+1}</td>
                        <td>${back.backnum}</td>
                        <td>${back.commodity.commName}</td>
                        <td>${back.commodity.commCode}</td>
                        <td>${back.commodity.price}</td>
                        <td>${back.num}</td>
                        <td>${back.client.clientnum}</td>
                        <td>${back.client.username}</td>
                        <td>${back.client.phone}</td>
                        <td>${back.backreal}</td>
                        <td>${back.backdate?date}</td>
                        <td>${back.source}</td>
                        <td><#if (back.backstate==1)>未审核</#if>
                            <#if (back.backstate==2)>待取货</#if>
                            <#if (back.backstate==3)>待退款</#if>
                            <#if (back.backstate==4)>已完成</#if>
                          </td>
                        <td> <a href="/order/findback?backid=${back.backid}">查看</a></td>
                    </tr>
                </#list>
                    <tr>
                        <td colspan="7" style="text-align: center">
                            <#--                    ordernum, String source, String orderdate, String username,-->
                            <#if (pageindex??)>
                                <#if (pageindex>1)>
                                    <a href="/order/findbacks?pageindex=1&backnum=${backnum!''}&source=${source!''}&backdate=${backdate!''}&username=${username!''}&backstate=${backstate!''}">首页</a>
                                    &nbsp;&nbsp;&nbsp;
                                    <a href="/order/findbacks?pageindex=${pageInfo.prePage}&backnum=${backnum!''}&source=${source!''}&backdate=${backdate!''}&username=${username!''}&backstate=${backstate!''}">上一页</a>
                                </#if>
                            </#if>
                            &nbsp;&nbsp;&nbsp;
                            <#if (pageindex??)>
                                <#if (pageindex<pages)>
                                    <a href="/order/findbacks?pageindex=${pageInfo.nextPage}&backnum=${backnum!''}&source=${source!''}&backdate=${backdate!''}&username=${username!''}&backstate=${backstate!''}">下一页</a>
                                    &nbsp;&nbsp;&nbsp;
                                    <a href="/order/findbacks?pageindex=${pageInfo.pages}&backnum=${backnum!''}&source=${source!''}&backdate=${backdate!''}&username=${username!''}">尾页</a>
                                </#if>
                            </#if>
                        </td>
                        <td colspan="7" style="text-align: center">
                            当前${pageInfo.pageNum} / ${pageInfo.pages}页 每页${pageInfo.pageSize}条
                        </td>
                    </tr>
                </tbody>
            </table>
            <#else ><h1>抱歉暂无数据!</h1>
            </#if>
        </div>
    </div>
</div>


</body>
</html>